package HomeWork;

import java.text.ParseException;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAccessor;

public class homework03 {
    public static void main(String[] args) throws ParseException {
        String str = "2020-11-11 12:23:12";
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        LocalDateTime parse = LocalDateTime.parse(str,dateTimeFormatter);
        LocalDateTime localDateTime = parse.plusYears(1).plusMonths(1).plusDays(1);
        DateTimeFormatter dateTimeFormatter2 = DateTimeFormatter.ofPattern("yyyy*MM*dd HH:mm:ss");
        System.out.println(dateTimeFormatter2.format(localDateTime));
       /* DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        LocalDateTime parse = LocalDateTime.parse(str, dateTimeFormatter);
        LocalDateTime localDateTime = parse.plusYears(1)
                .plusMonths(2)
                .plusDays(3)
                .plusHours(4)
                .plusMinutes(8)
                .plusSeconds(45);
        DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH小时mm分钟ss秒");
        String format = localDateTime.format(dateTimeFormatter1);
        System.out.println(format);*/
    }
}
